package com.genius.smsbase.Dao;

import com.genius.smsbase.Domain.BaseEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.NoRepositoryBean;

import java.io.Serializable;

/**
 * @DaoName GenericDao
 * @Description GenericDao
 * @author：
 */
@NoRepositoryBean
//通用接口
public interface GenericDao<T extends BaseEntity<PK>, PK extends Serializable> extends JpaRepository<T, PK> {
    /**
     *
     * @param name
     * @param pageable
     * @return Page
     */
    Page<T> findByNameLike(String name, Pageable pageable);

}
